package art.client;

import java.util.List;

import art.client.views.ArtUploadView;
import art.client.views.ArtsListView;
import art.client.views.LoginView;
import art.client.views.MenuView;
import art.client.views.UserArtsView;
import art.client.views.UserInfoView;
import art.client.views.UsersListView;
import art.shared.entities.GenreShared;
import art.shared.entities.LoginInfo;

import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.place.shared.PlaceController;
import com.google.web.bindery.event.shared.EventBus;

public class ClientFactoryImpl implements ClientFactory {

	private final EventBus eventBus = new SimpleEventBus();
	private final PlaceController placeController = new PlaceController(
			eventBus);

	@Override
	public EventBus getEventBus() {
		return eventBus;
	}

	@Override
	public PlaceController getPlaceController() {
		return placeController;
	}

	@Override
	public LoginView getLoginView(LoginInfo loginInfo) {
		return new LoginView(this, loginInfo);
	}

	@Override
	public ArtsListView getArtsListView(LoginInfo loginInfo, List<GenreShared> genres) {
		return new ArtsListView(this, loginInfo, genres);
	}

	@Override
	public MenuView getMenuView(LoginInfo loginInfo) {
		return new MenuView(this, loginInfo);
	}

	public ArtUploadView getArtUploadView(LoginInfo loginInfo, List<GenreShared> genres) {
		return new ArtUploadView(this, loginInfo, genres);
	}

	public UsersListView getUsersListView(LoginInfo loginInfo) {
		return new UsersListView(this, loginInfo);
	}

	@Override
	public UserArtsView getUserArtsView(LoginInfo loginInfo, List<GenreShared> genres) {
		return new UserArtsView(this, loginInfo, genres);
	}

	@Override
	public UserInfoView getUserInfoView(LoginInfo loginInfo) {
		return new UserInfoView(this, loginInfo);
	}

}
